import request from '@/utils/request'

// 查询合同表列表
export function listContract(query) {
  return request({
    url: '/basic/contract/list',
    method: 'get',
    params: query
  })
}

// 查询合同表详细
export function getContract(contractId) {
  return request({
    url: '/basic/contract/' + contractId,
    method: 'get'
  })
}

// 新增合同表
export function addContract(data) {
  return request({
    url: '/basic/contract',
    method: 'post',
    data: data
  })
}

// 修改合同表
export function updateContract(data) {
  return request({
    url: '/basic/contract',
    method: 'put',
    data: data
  })
}

// 删除合同表
export function delContract(contractId) {
  return request({
    url: '/basic/contract/' + contractId,
    method: 'delete'
  })
}

// 根据医院id公司id 查所有合约
export function hospitalCompanyToContract(params) {
  return request({
    url: '/basic/contract/queryList',
    method: 'get',
    params: params
  })
}